package com.ecnu.system.service.impl;

import com.ecnu.system.domain.ProjectNotice;
import com.ecnu.system.mapper.ProjectNoticeMapper;
import com.ecnu.system.service.IProjectNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 公告 服务层实现
 * 
 * @author ruoyi
 */
@Service
public class ProjectNoticeServiceImpl implements IProjectNoticeService
{
    @Autowired
    private ProjectNoticeMapper projectNoticeMapper;

    /**
     * 新增活动公告
     * 
     * @param notice 公告信息
     * @return 结果
     */
    @Override
    public int insertNotice(ProjectNotice notice) {
        return projectNoticeMapper.insertNotice(notice);
    }

    @Override
    public List<ProjectNotice> selectNoticeByProjectId(Long projectId) {
        return projectNoticeMapper.selectNoticeByProjectId(projectId);
    }
}
